import request from '@/utils/request'

/**
 * @description 登录
 * @returns
 */
export const reqLogin = (phone: any, password: any) => {
  return request('/api/user/passport/login', 'POST', { phone, password })
}

/**
 * @description 获取验证码
 * @returns
 */
export const reqCode = (phone: any) => {
  return request(`/api/user/passport/sendCode/${phone}`, 'GET')
}

/**
 * @description 注册
 * @param data
 * @returns
 */
export const reqRegister = (data: any) => {
  return request('/api/user/passport/register', 'POST', data)
}

export const reqLogout = () => {
  return request('/api/user/passport/logout', 'GET')
}
